import request from "./request";
const Req = new request()

export function list(page = 0, limit = 10) {
    return Req.get({
        url: '/noticeList',
        data: {
            page,
            limit
        }
    })
}
export function add({ content, mode }) {
    return Req.post({
        url: '/noticeAdd',
        data: {
            content, mode
        }
    })
}

export function del({ _id }) {
    return Req.post({
        url: '/noticeDelete',
        data: {
            _id
        }
    })
}
export function update({ _id, content, mode }) {
    return Req.post({
        url: '/noticeUpdate',
        data: {
            _id, content, mode
        }
    })
}
